<template>
  <div class="w-full p-10 print-style relative bg-white h-full">
    <div class="flex items-center">
      <div>
        <div v-if="printData.printName === 'rptWD_SS_QDFB'">
          <img :src="printData?.printData?.detail[0]?.logo" style="width: 200px; height: 60px" alt="" />
        </div>
        <div v-else>{{ getSystemConfig('HISNAME') }}</div>
        <BaseBarcode v-if="printData?.printData?.detail[0]" :value="printData?.printData?.detail[0].barcode" class="absolute top-0 right-0" />
        <div>过敏史：{{ printData?.printData?.detail[0]?.brGms }}</div>
      </div>
      <div class="ml-3">
        <div class="mb-2">
          <span>{{ printData?.printData?.detail[0]?.brName }}</span>
          <span class="ml-10 mr-5">{{ printData?.printData?.detail[0]?.brXb }}</span>
          <span>{{ printData?.printData?.detail[0]?.brAge }}</span>
        </div>
        <div class="text-[12px]">
          <span class="mr-3">眼别：{{ printData?.printData?.detail[0]?.type }}</span>
          <span v-if="printData.printName === 'rptWD_SS'">{{ printData?.printData?.detail[0]?.brBtd }}</span>
        </div>
        <div v-if="printData.printName === 'rptWD_SS_QDFB'" class="text-[12px]">出生日期：{{ printData?.printData?.detail[0]?.brBtd }}</div>
        <div class="text-[12px]">OD:{{ printData?.printData?.detail[0]?.odmc }}</div>
        <div class="text-[12px]">OS:{{ printData?.printData?.detail[0]?.osmc }}</div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { getSystemConfig } from '@/utils/systemConfig'

defineProps({
  printData: {
    type: Object,
    default: () => ({})
  }
})
</script>
<style lang="less" scoped>
// @media print {
//   @page {
//     size: 21cm 29.7cm;
//   }
// }
</style>
